package cn._tedu.eguser1.eguser1.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import java.util.Date;

/**
 * @author tune_the last
 * @date 2025/11/12 - 14:51
 */
@Data
public class UserAddParam {
    @Pattern(regexp = "^(?=.{4,12}$)(?!.*(.)\\1{2}).*$", message = "用户名长度为4-12位，且不允许连续出现3个及以上相同字符！")
    @Schema(description = "用户名", required = true)
    private String username;
    @Schema(description = "密码", required = true)
    private String password;
    @Schema(description = "昵称", required = false)
    private String nickname;
}
